import FinalProject.SiteUser
import FinalProject.Game
import FinalProject.Platform
import FinalProject.Review

class BootStrap {

    def init = { servletContext ->
        Date d1 = new Date()
        SiteUser u1 = new SiteUser()
        u1.name = "Superstar Jesus Christ"
        u1.dateJoined = new Date()
        SiteUser u2 = new SiteUser()
        u2.name = "Super Mario"
        u2.dateJoined = new Date()
        SiteUser u3 = new SiteUser()
        u3.name = "Wilt 'The Stilt' Chamberlain"
        u3.dateJoined = new Date()
        SiteUser u4 = new SiteUser()
        u4.name = "Emily Dickinson"
        u4.dateJoined = new Date()
        SiteUser u5 = new SiteUser()
        u5.name = "Reposted Wikipedia Info"
        u5.dateJoined = new Date()
        Platform p1 = new Platform(name: "Wii", dateOfRelease: "2006")
        Platform p2 = new Platform(name: "Playstation 3", dateOfRelease: "2006")
        Platform p3 = new Platform(name: "XBox 360", dateOfRelease: "2005")
        p1.save(failOnError: true)
        p2.save(failOnError: true)
        p3.save(failOnError: true)
        Game g1 = new Game(name: "Super Smash Brothers Brawl", releaseDate: "3/09/2008")
        g1.save(failOnError:true)
        Game g2 = new Game(name: "Wii Sports", releaseDate: "11/19/2006")
        g2.save(failOnError:true)
        Game g3 = new Game(name: "NBA 2k11", releaseDate: "10/5/2010")
        g3.save(failOnError:true)
        Game g4 = new Game(name: "Katamari Forever", releaseDate: "9/22/2009")
        g4.save(failOnError:true)
        Game g5 = new Game(name: "Saints Row", releaseDate: "8/29/2006")
        g5.save(failOnError:true)
        Game g6 = new Game(name: "Super Mario Galaxy", releaseDate: "11/12/2007")
        g6.save(failOnError:true)
        Game g7 = new Game(name: "FIFA 10", releaseDate: "10/20/2009")
        g7.save(failOnError:true)
        Game g8 = new Game(name: "Halo 3", releaseDate: "9/25/2007")
        g8.save(failOnError:true)
        Game g9 = new Game(name: "Playstation All-Stars Battle Royale", releaseDate: "11/20/2012")
        g9.save(failOnError:true)
        Game g10 = new Game(name: "Marvel vs. Capcom 3", releaseDate: "2/15/2011")
        g10.save(failOnError:true)
        Game g11 = new Game(name: "Street Fighter IV", releaseDate: "2/17/2009")
        g11.save(failOnError:true)
        Game g12 = new Game(name: "Gran Turismo 5", releaseDate: "11/24/2010")
        g12.save(failOnError:true)
        p1.addToGames(g1)
        p1.addToGames(g2)
        p1.addToGames(g6)
        p2.addToGames(g4)
        p2.addToGames(g7)
        p2.addToGames(g9)
        p2.addToGames(g12)
        p3.addToGames(g3)
        p3.addToGames(g5)
        p3.addToGames(g8)
        p3.addToGames(g10)
        p3.addToGames(g11)
        u1.post("This game really rules!", g1)
        u3.post("Basketball is my favorite sport, I like the way they dribble up and down the court.  In all seriousness though, this game had a severe lack of myself, Wilt 'The Stilt' Chamberlain, as an in-game playable character.  For some reason they chose to make Michael Jordan the star of the show. Did Michael Jordan ever score 100 points in a game?  I think not.  Ridiculous.", g3)
        u3.post("This game didn't have basketball in it.  It did have a ball though, which was a decent substitute I suppose.  Unfortunately all you could do is roll the ball around, not dribble up and down the court or show off any of my stylish slam dunks.", g4)
        u2.post("This is an excellent, excellent game. Step one, it stars me and my two best friends, Luigi and Toon Link.  The three of us can basically team up whenever we want to do battle with our enemies, like Bowser, Donkey Kong and Sonic the Hedgehog.  Also I get to show off all my cool powers, including but not limited to fireballs and shooting water at stuff.  The only way this could be improved is if they were to bring in my two other best friends, Dr. Mario and Baby Luigi.",g1)
        u3.post("Another ridiculous game. It's called 'Wii Sports' but a better name would've been 'Wii Sports that nobody ever plays'.  I mean seriously, they include marginal sports like bowling and golf but can't manage to put in the greatest sport of all time, basketball.  What's the point of waving around a little remote control stick thing if I'm not using it to throw down some sweet dunks?", g2)
        u4.post("Get out of my way I'm Emily Dickinson!", g5)
        u5.post("Super Mario Galaxy is the second highest-rated game of all time on the review aggregator website TopTenReviews,[3] as well as the highest-rated game of all time on review aggregator website GameRankings.[59] The game is the third highest rated game of all-time on Metacritic.[60]Nintendo Power voted in its August 2008 issue that Super Mario Galaxy was the best game for the Wii; it was also the only Mario game to get a top spot on the list, as well as the only game to be unanimously voted for the top position. NTSC-uk said that Super Mario Galaxy \"will influence gaming perceptions, sure to replenish any lost passion\".[61] GamePro stated that the title \"raises the bar in terms of what can be achieved on the Wii.\"[44] IGN called Super Mario Galaxy \"Wii's best game, and an absolute must-own experience\", and \"one of the greatest platformers ever played.\"[8] GameSpot praised its gameplay and level design stating: \"if ever there were a must-own Wii game, Super Mario Galaxy is it.\"[46] Game Revolution noted the variety of gameplay, reliable camera angles and easy to use controls.[45] As of March 2012, the game has sold 10.68 million copies worldwide, ranking No. 9 on the best-selling Wii games list.[5]",g6)
        u5.post("FIFA 10 has received high critical acclaim, with a 91% aggregate rating at Metacritic[38] and a 90% aggregate rating on GameRankings.[33] The first review was a 9/10 from PlayStation Official Magazine (UK), commenting \"This not only plays the best on-the-pitch football of any FIFA title, but it has an incredibly smart and compelling way of tying it all together, too. Brilliant, again.\"",g7)
        u5.post("Most publications agreed that multiplayer was by far one of the best features; IGN said that the multiplayer map lineup was the strongest of the series,[9] and Gamespy added that \"each [multiplayer] map is extremely well-tuned\".[105] The Forge level editor and saved films features were singled out as particularly strong features,[11] in addition to superb voice acting and Martin O'Donnell's rich score.",g8)
        u5.post("PlayStation All-Stars Battle Royale has received mostly positive reviews. Critics praised the game's multiplayer, but criticized its lack of content, still images in campaign mode and few cut scenes. The use of super moves as the only way to defeat a player had mixed reception. While some critics thought it lacked depth, others believed that filling up the meter to land a knock-out added strategy to an otherwise only decent fighting experience. The game currently holds a 76 score on Metacritic, indicating generally favorable reviews.",g9)
        u5.post("Reviews have been generally positive, with Metacritic scores of 85 and 84 for the Xbox 360 and PlayStation 3 versions respectively,[43][44] GameRankings aggregrate scores of 85% for both versions,[41][42] and a GameStats press score of 9.0 out of 10.[45] IGN gave the game a score of 8.5 and an Editor's Choice award, praising the game's balance and depth, but criticising the lack of extras compared to recent Capcom fighting games.[55] GamesMaster gave the game a score of 90%, calling it \"the most explosive, OTT, fan-pleasing 2D fighting game the world's ever seen.\"[52] GamesRadar gave the game 9/10, calling it a worthy successor to Marvel vs. Capcom 2.[54] 1UP.com gave the game an A- rank, calling it \"sometimes cheap and overpowered, but way more fun than Super Street Fighter IV.\"[47] PSM3 gave the game a score of 7.9 out of 10, criticizing that the game's chaotic style makes it difficult for casual players to pick up and play.[48] Edge gave the game 7/10, saying \"the lack of meaningful rewards suggest Capcom may be banking on the ever-alluring money pit of DLC to bolster sales.\"[63] Game Informer gave the game a 9.25 and named it their \"Game of the Month\". The game was praised for its enjoyable and renovated gameplay, more diverse cast of characters and its training and simple mode for new players. The game was criticized for its endings and lack of online modes.[64]",g10)
        u5.post("Giant Bomb gave the game 5 out of 5 stars stating that \"Street Fighter IV combines old and new in powerful ways, resulting in a game familiar enough to bring retired fans back into the fold while being different enough to appeal to the players who have stuck with the genre since day one.\"[73] Eurogamer gave the game 10/10 stating that \"after over a month of playing Street Fighter IV almost daily, what has become quite clear is that it manages to appeal to a huge range of abilities and tastes without ever compromising its fidelity\". Planet Xbox 360 was similar in its praise for the game, awarding it 9.1/10 and only finding fault with the Xbox 360's controller.",g11)
        u5.post("Gran Turismo 5 was met with generally positive reaction from game critics. It received an aggregated score of 84.39% on GameRankings[72] and 84/100 on Metacritic.[73] Reviewers praised the number of cars, car-specific information and commented positively on the driving physics which had been improved from Gran Turismo 5 Prologue. The inclusion of karts as well as licensed World Rally Championship and NASCAR vehicles was also received positively.",g12)
        u5.post("The editors of Japanese game magazine Famitsu, who awarded it a perfect score, praised the variety and depth of the single-player content, the unpredictability of Final Smashes, and the dynamic fighting styles of the characters.[88][103] Chris Slate of Nintendo Power awarded Brawl a perfect score in the March 2008 issue, calling it \"one of the very best games that Nintendo has ever produced\".[90] GameSpot editor Lark Anderson noted that Brawl's \"simple controls and gameplay make it remarkably accessible to beginners, yet still appealing to veterans\", while GameTrailers mentioned the amount of content that gives the game \"staying power that few other games possess\".[89][104] Eurogamer praised the game's ability to stay fun in both single-player and multiplayer modes, while \"fulfilling its usual role of dominating a willing crowd's evening into the early hours, and now allowing you to sustain that after everyone's gone home\".[87] Game Revolution hailed Brawl's soundtrack as \"spectacular ... spanning a generous swath of gaming history\".[13] Game Informer highlighted Brawl's \"finely tuned balance, core fighting mechanics, and local multiplayer modes\".[105] Edge concluded that, while the Smash Bros. games have often been \"derided as button-mashing\", Brawl features \"one of the most enduringly innovative and deep systems of any fighter\".[106]",g1)
        u5.post("Wii Sports has received generally positive reviews.[39][38] GameTrailers called it a good complement to the Wii system and referred to all five games as a \"nice total package\". They commented that the games provided enough gameplay for long time gamers without making it inaccessible to novices. GameTrailers stated, however, that the lack of a tournament mode was a detractor, and did not recommend paying for the game if it did not come bundled with the system.[14] GamePro also commented that the free addition of Wii Sports with the Wii was a positive.[4] Matt Casamassina of IGN called it a \"successful showpiece for Nintendo's new hardware\" and enjoyed the ability to import Miis.[3] GameSpot editor Ryan Davis complimented the multiplayer aspect and the fitness test.[45] Reviewers praised the game's controls and ease of use.",g2)
        u5.post("The game has received critical acclaim. Several game review websites have praised NBA 2K11 for its developed controls, online multi-player, and Michael Jordan features. IGN Editor-In-Chief Hilary Goldstein proclaimed, \"This isn't just the best basketball game ever; it's the best sports game of this generation.\"[11] Mike D'Alonzo of G4tv.com echoed these sentiments in his review and stated that 2K11 \"is not only the best basketball game I've ever played, it's one of the best sports games I've ever played, and a serious contender for Game of the Year.\"[7]",g3)
        u5.post("Katamari Forever received a 33 out of 40 by Japanese gaming publication Famitsu.[11] It was the 6th best-selling game in Japan during the week of its release, selling 28,000 units.[12] In America, IGN awarded the game a 7 of 10 noting that the game still suffered from many of the issues that plagued past entries in the series.[13] PixlBit awarded the game 4 of 5 stars recommending the game to both fans of the series and newcomers alike.[14]",g4)
        u5.post("The game has received generally positive ratings. Although most critics have noted the striking similarities in gameplay that Saints Row shares with releases from the Grand Theft Auto series, they have also praised the game for the inclusion of new features and its improvement of existing ones from GTA. Saints Row has received ratings of 95/100 from GamePro,[5] 8.75/10 from Game Informer,[5] 80/100 from Official Xbox Magazine,[5] 8.5/10 from IGN,[2] 8.4/10 from GamerNode,[5] and 8.3/10 from GameSpot.[5] GamePro called it \"the best reason to own an Xbox 360 this side of Oblivion\",[6] while IGN noted, \"Hate it if you want to, snicker at its obvious me-too qualities, but don't forget to recognize impressive, kick-ass gameplay as you walk out the door.\"[2] Saints Row has received an average critic score of 82% on Game Rankings and 81% on Metacritic.[5] It was the Australian video game talk show,Good Game's, first ever review, with the two reviewers giving the game a 7/10 and 8/10.[7]",g5)
        u4.post("Apparently with no surprise,\n" +
                "To any happy flower,\n" +
                "The frost beheads it at its play,\n" +
                "In accidental power.\n" +
                "The blond assassin passes on.\n" +
                "The sun proceeds unmoved,\n" +
                "To measure off another day,\n" +
                "For an approving God.",g8)
        u1.save(failOnError: true)
        u2.save(failOnError: true)
        u3.save(failOnError: true)
        u4.save(failOnError: true)
        u5.save(failOnError: true)
    }
    def destroy = {
    }
}
